<div class="admin">
    <form method="post" name="myform" id="myform" action="">
        <div class="panel admin-panel">
            <div class="panel-head"><strong>修改代金券</strong></div>
            <div class="padding border-bottom">
                <div class="bg-back radius padding">
                    <h4>说明：</h4>
                    <p class="text-indent">满即送活动包括店铺所有商品，活动时间不能和已有活动重叠</p>
                    <p class="text-indent">每个满即送活动最多可以设置3个价格级别，点击新增级别按钮可以增加新的级别，价格级别应该由低到高</p>
                </div>
            </div>
            <table class="table table-hover">
                <tr>
                    <td width='160px'><span class="c-red">*</span>代金券名称：</td>
                    <td width='*'><input type="text" class="input input_big" value="{$re['voucher_title']}" placeholder="" id="" name="voucher_title"></td>
                    <td width='*'></td>
                </tr>
                <tr>
                    <td><span class="c-red">*</span>开始日期：</td>
                    <td>
                        <input type="text" class="input input_small" style="float:left;" readonly="readonly" datatype="*" value="{$re['voucher_start_date']|date='Y-m-d',###}" id="voucher_start_date" name="voucher_start_date">
                        <div class="label Validform_checktip"></div>
                    </td>
                    <td></td>
                </tr>
                <tr>
                    <td><span class="c-red">*</span>结束日期：</td>
                    <td>
                        <input type="text" class="input input_small" style="float:left;" readonly="readonly" datatype="*" value="{$re['voucher_end_date']|date='Y-m-d',###}" id="voucher_end_date" name="voucher_end_date">
                        <div class="label Validform_checktip"></div>
                    </td>
                    <td></td>
                </tr>
                <tr>
                    <td><span class="c-red">*</span>面额：</td>
                    <td><input name="voucher_price" value="{$re['voucher_price']}" class="inputL input_smallL" type="text"><em class="add-on">元</em></td>
                    <td></td>
                </tr>
                <tr>
                    <td><span class="c-red">*</span>消费金额：</td>
                    <td><input name="voucher_limit" value="{$re['voucher_limit']}" class="inputL input_smallL" type="text"><em class="add-on">元</em></td>
                    <td></td>
                </tr>
                <tr>
                    <td><span class="c-red">*</span>可发放总数：</td>
                    <td><input name="voucher_total" value="{$re['voucher_total']}" class="inputL input_smallL" type="text"><em class="add-on">个</em></td>
                    <td></td>
                </tr>
                <tr>
                    <td><span class="c-red">*</span>每人限领：</td>
                    <td>
                        <select name="voucher_eachlimit" class="inputL input_small">
                            <option value="1" <if condition="$re['voucher_eachlimit'] eq 1">selected="selected"</if>>1</option>
                            <option value="2" <if condition="$re['voucher_eachlimit'] eq 2">selected="selected"</if>>2</option>
                            <option value="3" <if condition="$re['voucher_eachlimit'] eq 3">selected="selected"</if>>3</option>
                            <option value="4" <if condition="$re['voucher_eachlimit'] eq 4">selected="selected"</if>>4</option>
                            <option value="5" <if condition="$re['voucher_eachlimit'] eq 5">selected="selected"</if>>5</option>
                        </select>
                        <em class="add-on">张</em>
                    </td>
                    <td></td>
                </tr>
                    <tr>
                        <td class="required">是否可领取:</td>
                        <td class="vatop rowform">
                            <div class="form-group">
                                <div class="field">
                                    <div class="button-group radio">
                                        <if condition="$re['voucher_recommend'] eq 1">
                                            <div class="form-group">
                                                <div class="field">
                                                    <div class="button-group radio">
                                                        <label class="button active">
                                                            <input name="voucher_recommend" value="1" checked="checked" type="radio"><span class="icon icon-check"></span> 可领取
                                                        </label>
                                                        <label class="button">
                                                            <input name="voucher_recommend" value="0" type="radio"><span class="icon icon-times"></span> 不可领取
                                                        </label>
                                                    </div>
                                                </div>
                                            </div>
                                            <else />
                                            <div class="form-group">
                                                <div class="field">
                                                    <div class="button-group radio">
                                                        <label class="button">
                                                            <input name="voucher_recommend" value="1" type="radio"><span class="icon icon-check"></span> 可领取
                                                        </label>
                                                        <label class="button active">
                                                            <input name="voucher_recommend" value="0" checked="checked" type="radio"><span class="icon icon-times"></span> 不可领取
                                                        </label>
                                                    </div>
                                                </div>
                                            </div>
                                        </if>
                                    </div>
                                </div>
                            </div>
                            <!--这是老的-->
                        </td>
                        <td class="vatop tips"></td>
                    </tr>
                <tr>
                    <td><span class="c-red">*</span>代金券描述：</td>
                    <td><textarea name="voucher_desc" cols="" rows="5" class="input input_big"  placeholder="说点什么...最少输入10个字符" datatype="*10-100" nullmsg="备注不能为空！" onKeyUp="textarealength(this, 200)">{$re['voucher_desc']}</textarea></td>
                    <td></td>
                </tr>
                <tr>
                    <td><span class="c-red">*</span>代金券图片：</td>
                    <td><input name="voucher_styleimg" class="inputL input_smallL" type="text"><em class="add-on">元</em></td>
                    <td></td>
                </tr>
            </table>
            <div class="panel-foot text-center">
                <div class="form-button">
                    <input name="voucher_id" value="{$re['voucher_id']}" type="hidden" />
                    <input class="button bg-main" type="submit" value="确认保存">
                    <button class="button bg" type="reset">取消</button>
                </div>
            </div>
        </div>
    </form>
</div>

<script type="text/javascript">
    $("#myform").Validform({
        tiptype: 3,
        showAllError:true,
    });
    
    $('#myform').layer({
    });

    $('#voucher_start_date').duxTime({
        minDate: 0,
        format:"Y-m-d H:i:s"
    });
    
    $('#voucher_end_date').duxTime({
        minDate: 0,
        format:"Y-m-d H:i:s"
    });
</script>